package cn.boot.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import cn.boot.entity.main.SimpleUser;
import util.FD;

@SuppressWarnings("serial")
@Entity
@Table(name = "t_user_mail")
public class UserMailConfig implements Serializable{
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	private int					id;
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "userId")
	private SimpleUser	user;
	@FD("SMTP端口")
	private int					smtpPort	= 25;
	@FD("SMTP服务器")
	private String			smtpHost;
	@FD("POP3端口")
	private int					pop3Port	= 110;
	@FD("POP3服务器")
	private String			pop3Host;
	@FD("邮箱账号")
	private String			account;
	@FD("邮箱密码")
	private String			password;

	public int getId() {
		return id;
	}

	public SimpleUser getUser() {
		return user;
	}

	public int getSmtpPort() {
		return smtpPort;
	}

	public int getPop3Port() {
		return pop3Port;
	}

	public String getAccount() {
		return account;
	}

	public String getPassword() {
		return password;
	}

	public String getSmtpHost() {
		return smtpHost;
	}

	public String getPop3Host() {
		return pop3Host;
	}

	public void setId(int id) {
		this.id = id;
	}

	public void setUser(SimpleUser user) {
		this.user = user;
	}

	public void setSmtpPort(int smtpPort) {
		this.smtpPort = smtpPort;
	}

	public void setPop3Port(int pop3Port) {
		this.pop3Port = pop3Port;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public void setSmtpHost(String smtpHost) {
		this.smtpHost = smtpHost;
	}

	public void setPop3Host(String pop3Host) {
		this.pop3Host = pop3Host;
	}

}
